From c11bf933ef341f22a695f1e0b392af5e913d5772 Mon Sep 17 00:00:00 2001 From: robertlipe Date: Mon, 26 Aug 2013 00:15:56 +0000 Subject: [PATCH] Gerhard brings MSVC up to speed. Resync GPSBabel.pro Kill mkwintesto Various MSVC weirdness. A change in main to set character encoding that really doesn't make sense to me since he changed only the latitude), RAD(lastwpt->longitude), RAD(wpt->latitude), RAD(wpt->longitude))) / - abs(wpt->creation_time.toTime_t() - lastwpt->GetCreationTime().toTime_t()); + abs((int)(wpt->creation_time.toTime_t() - lastwpt->GetCreationTime().toTime_t())); //printf("speed line %d %lf \n",line,speed); } /* Error handling: in the tracklog of my device sometimes "jump" waypoints ;-) */ diff --git a/gpsbabel/main.cc b/gpsbabel/main.cc index ddc50b208..d61917323 100644 --- a/gpsbabel/main.cc +++ b/gpsbabel/main.cc @@ -239,7 +239,12 @@ main(int argc, char* argv[]) signed int wpt_ct_bak, rte_ct_bak, trk_ct_bak; /* #ifdef UTF8_SUPPORT */ arg_stack_t* arg_stack = NULL; +#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) + //Qt requires that source files are stored in utf-8 in Qt5 (setCodecForCStrings removed) + //Allow compile for newer Qt, even if testo may fail + //This should be addressed in the Qt4 builds too QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8")); +#endif global_opts.objective = wptdata; global_opts.masked_objective = NOTHINGMASK; /* this makes the default mask behaviour slightly different */ diff --git a/gpsbabel/mingw/Makefile b/gpsbabel/mingw/Makefile index 899c9316f..6ebad2d0f 100644 --- a/gpsbabel/mingw/Makefile +++ b/gpsbabel/mingw/Makefile @@ -4,8 +4,6 @@ VPATH=..:../shapelib FILES=gpsbabel.exe ../win32/GPSBabelGUI.exe ../win32/gui-2/README.gui \ ../README* ../style/README.style ../COPYING ../readme.html -gpsbabel.exe: wintesto.cmd - include ../Makefile CFLAGS=-Iinclude -I../coldsync -O $(INHIBIT_USB) $(EXTRA_CFLAGS) # @@ -20,12 +18,6 @@ gpsbabel.exe: $(OBJS) zip -j /tmp/gpsbabel-$(VERSIOND).zip $(FILES) cp gpsbabel.exe /tmp -mkwintesto: mkwintesto.c - /usr/bin/cc mkwintesto.c -o mkwintesto - -wintesto.cmd: mkwintesto - ./mkwintesto ../testo - # The "usbfree" target is useful for generating an executable that # works on NT 3.5 or 4.0 since it doesn't have USB support and tanks # on our libsetupapi references. diff --git a/gpsbabel/mingw/mkwintesto.c b/gpsbabel/mingw/mkwintesto.c deleted file mode 100644 index 78d2535f1..000000000 --- a/gpsbabel/mingw/mkwintesto.c +++ /dev/null @@ -1,476 +0,0 @@ -/* - File for "converting" GPSBabel's testo shell script into - MS Windows NT/2000/XP command script. - - It is limited to: - - testo using the shell variable PNAME for the executable program being tested - - testo using ${TMPDIR} for the temporary directory in which test files are created - - testo using compare as the name of a shell function for comparing test results - - no other shell script conversion is performed apart from whole line comments; - unconverted script is discarded, not even included as comments in the output - - Copyright (C) 2003 Mark Bradley, mrcb.sf.gpsb@osps.net - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA - */ - - -#include -#include -#include -#include - -#define LINELENGTH 256 -#define MYNAME "MkWinTesto" - -/* ------------------------------------------------------------------------------------ */ -int f_outputLine ( - FILE *pfWhere, - char *pcWhat) -{ - int iLength; - int iThisChar; - - /* =========================== - Return 0 = output has new line - Return 1 = line ended on \ for continuation and no new line - */ - - iLength = strlen(pcWhat); - if (iLength > 2) { - if ((*(pcWhat+iLength-3) == '\\') && - (*(pcWhat+iLength-2) == '\r') && - (*(pcWhat+iLength-1) == '\n')) { - - for (iThisChar=0; iThisChar < iLength-3; iThisChar++) - fputc(*(pcWhat+iThisChar), pfWhere); - return 1; - } - } - if (iLength > 1) { - if ((*(pcWhat+iLength-2) == '\\') && - (*(pcWhat+iLength-1) == '\n')) { - - for (iThisChar=0; iThisChar < iLength-2; iThisChar++) - fputc(*(pcWhat+iThisChar), pfWhere); - return 1; - } - } - if (iLength > 0) { - if (*(pcWhat+iLength-1) == '\\') { - - for (iThisChar=0; iThisChar < iLength-1; iThisChar++) - fputc(*(pcWhat+iThisChar), pfWhere); - return 1; - } - } - - fputs(pcWhat, pfWhere); - fputs("\r\n", pfWhere); - return 0; -} - -/* ------------------------------------------------------------------------------------ */ -void -fatal(const char *fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - vfprintf(stderr, fmt, ap); - va_end(ap); - exit(1); -} - -/* ------------------------------------------------------------------------------------ */ -int main( -int argc, - char *argv[]) -{ - char acLineIn[LINELENGTH]; - char acLineOut[LINELENGTH]; - char *pcTerm; - - int iThisChar; - int iStart; - int iTarget; - int iTranslateQuotes; - int iQuoteCount; - int iPrevLineContinues = 0; - int iEchoLevel = 0; - - FILE *pfTestoIn; - FILE *pfTestoOut; - - /* =========================== */ - - if (argc < 2) { - fatal(MYNAME ": needs a single parameter, the (testo) file to convert\n"); - } - pfTestoIn = fopen(argv[1], "rb"); - - if (pfTestoIn == NULL) { - fatal(MYNAME ": %s for reading\n",argv[1]); - } - else { - pfTestoOut = fopen ("wintesto.cmd", "wb"); - if (pfTestoOut == NULL) { - fatal (MYNAME ": wintesto.cmd for writing\n"); - } - else { - - /* Output the .CMD preamble */ - f_outputLine(pfTestoOut, "@echo off"); - f_outputLine(pfTestoOut, "REM"); - f_outputLine(pfTestoOut, "REM Simple Windows NT/2000/XP .cmd version of GPSBabel testo script"); - f_outputLine(pfTestoOut, "REM"); - f_outputLine(pfTestoOut, ""); - f_outputLine(pfTestoOut, "SET GPSBABEL_FREEZE_TIME=y"); - f_outputLine(pfTestoOut, "SET TMPDIR=%TEMP%\\WINTESTO"); - f_outputLine(pfTestoOut, "MKDIR %TMPDIR% 2>NUL:"); - f_outputLine(pfTestoOut, ""); - f_outputLine(pfTestoOut, "GOTO :REALSTART"); - f_outputLine(pfTestoOut, ""); - f_outputLine(pfTestoOut, "REM =================================="); - f_outputLine(pfTestoOut, ""); - f_outputLine(pfTestoOut, ":CommonCOMPARE"); - f_outputLine(pfTestoOut, "SET PARAM1=%2"); - f_outputLine(pfTestoOut, "SET PARAM2=%3"); - f_outputLine(pfTestoOut, "REM Test if param3 was a dir rather than a file, if so add a \\* to make fc work"); - f_outputLine(pfTestoOut, "FOR %%A IN (%3) DO IF \"d--------\"==\"%%~aA\" SET PARAM2=%3\\*"); - f_outputLine(pfTestoOut, "FOR /f \"delims=\" %%a IN ('fc %PARAM1% %PARAM2%') DO IF \"x%%a\"==\"xFC: no differences encountered\" GOTO :EOF"); - f_outputLine(pfTestoOut, "REM Show the first 5 lines of difference"); - f_outputLine(pfTestoOut, "fc %1 /LB5 %PARAM1% %PARAM2%"); - f_outputLine(pfTestoOut, "if errorlevel 1 ECHO %* are not the same (first 5 differences above) - pausing. ^C to quit if required"); - f_outputLine(pfTestoOut, "if errorlevel 1 PAUSE"); - f_outputLine(pfTestoOut, "GOTO :EOF"); - f_outputLine(pfTestoOut, ""); - f_outputLine(pfTestoOut, "REM =================================="); - f_outputLine(pfTestoOut, ""); - f_outputLine(pfTestoOut, ":COMPARE"); - f_outputLine(pfTestoOut, "CALL :CommonCOMPARE /L %1 %2"); - f_outputLine(pfTestoOut, "GOTO :EOF"); - f_outputLine(pfTestoOut, ""); - f_outputLine(pfTestoOut, "REM =================================="); - f_outputLine(pfTestoOut, ""); - f_outputLine(pfTestoOut, ":BINCOMPARE"); - f_outputLine(pfTestoOut, "CALL :CommonCOMPARE /B %1 %2"); - f_outputLine(pfTestoOut, "GOTO :EOF"); - f_outputLine(pfTestoOut, ""); - f_outputLine(pfTestoOut, "REM =================================="); - f_outputLine(pfTestoOut, ""); - f_outputLine(pfTestoOut, ":SORTandCOMPARE"); - f_outputLine(pfTestoOut, "SORT <%1 >%TMPDIR%\\s1"); - f_outputLine(pfTestoOut, "SORT <%2 >%TMPDIR%\\s2"); - f_outputLine(pfTestoOut, "CALL :COMPARE %TMPDIR%\\s1 %TMPDIR%\\s2"); - f_outputLine(pfTestoOut, "GOTO :EOF"); - f_outputLine(pfTestoOut, ""); - f_outputLine(pfTestoOut, "REM =================================="); - f_outputLine(pfTestoOut, ""); - f_outputLine(pfTestoOut, ":REALSTART"); - f_outputLine(pfTestoOut, ""); - - - - while (! feof(pfTestoIn)) { - /* Read in the next line or stop if done */ - fgets(acLineIn, LINELENGTH-1, pfTestoIn); - if (acLineIn == NULL) break; - - /* Is the whole line a comment? Replace the hash with REM and output the rest */ - if (acLineIn[0] == '#') { - acLineOut[0]='\0'; - strcat (acLineOut,"REM"); - iTarget = 3; - - /* Add a space after the REM if the next char in the source isn't space */ - /* We're trying to preserve the original as much as possible */ - if (acLineIn[1] != ' ') { - strcat (acLineOut, " "); - iTarget++; - } - - /* Strip out any ending new lines */ - for (iThisChar=1; iThisChar 0) { - f_outputLine(pfTestoOut, "@echo off"); - f_outputLine(pfTestoOut, "@echo."); - iEchoLevel = 0; - } - iPrevLineContinues = f_outputLine(pfTestoOut, acLineOut); - } /* Is the whole line a comment? */ - - /* Are we near the top of testo where the program variable is defined? */ - else if (strncmp("PNAME=${PNAME:-",acLineIn,15) == 0) { - acLineOut[0]='\0'; - strcat (acLineOut,"SET PNAME="); - /* Copy the rest of the PNAME assignment stopping at a close } or EOL */ - for (iThisChar=15; iThisChar 0) { - f_outputLine(pfTestoOut, "@echo off"); - f_outputLine(pfTestoOut, "@echo."); - iEchoLevel = 0; - } - iPrevLineContinues = f_outputLine(pfTestoOut, acLineOut); - if (iPrevLineContinues == 1) f_outputLine(pfTestoOut, ""); - iPrevLineContinues = f_outputLine(pfTestoOut, "IF NOT EXIST %PNAME%.EXE ECHO Can't find %PNAME%&& GOTO :EOF"); - /* fputs("\r\n"); */ - } /* Are we near the top of testo where the program variable is defined? */ - - else { - /* Every other line.... */ - iStart = 0; - iTarget = 0; - iTranslateQuotes = 0; - iQuoteCount = 0; - acLineOut[0] = '\0'; - - /* Is this one of the test sequences mostly (all?) starting with a cleanup? */ - if (strncmp("rm -f ",acLineIn,6) == 0) { - if (iEchoLevel > 0) { - f_outputLine(pfTestoOut, "@echo off"); - f_outputLine(pfTestoOut, "@echo."); - iEchoLevel = 0; - } - iStart = 6; - strcat(acLineOut, "DEL "); - iTarget = 4; - } - /* Is this one of the test sequences where the program is run? */ - if (strncmp("${PNAME} ",acLineIn,9) == 0) { - iStart = 9; - iEchoLevel++; - strcat(acLineOut, "%PNAME% "); - iTarget = 8; - } - /* Is this one of the test sequences where we compare the rest? */ - if (strncmp("compare ",acLineIn,8) == 0) { - if (iEchoLevel > 0) { - f_outputLine(pfTestoOut, "@echo off"); - f_outputLine(pfTestoOut, "@echo."); - iEchoLevel = 0; - } - iStart = 8; - strcat(acLineOut, "CALL :COMPARE "); - iTarget = 14; - } - /* Is this one of the test sequences where we compare the rest? */ - if (strncmp("bincompare ",acLineIn,11) == 0) { - if (iEchoLevel > 0) { - f_outputLine(pfTestoOut, "@echo off"); - f_outputLine(pfTestoOut, "@echo."); - iEchoLevel = 0; - } - iStart = 11; - strcat(acLineOut, "CALL :BINCOMPARE "); - iTarget = 17; - } - /* Is this one of the test sequences where we compare the rest? */ - if (strncmp("sort_and_compare ",acLineIn,17) == 0) { - if (iEchoLevel > 0) { - f_outputLine(pfTestoOut, "@echo off"); - f_outputLine(pfTestoOut, "@echo."); - iEchoLevel = 0; - } - iStart = 17; - strcat(acLineOut, "CALL :SORTandCOMPARE "); - iTarget = 21; - } - /* Is this one of the test sequences where we prepare some data? */ - if (strncmp("echo \"",acLineIn,6) == 0) { - if (iEchoLevel > 0) { - f_outputLine(pfTestoOut, "@echo off"); - f_outputLine(pfTestoOut, "@echo."); - iEchoLevel = 0; - } - iStart = 6; - strcat(acLineOut, "ECHO "); - iTarget = 5; - iTranslateQuotes = 1; - iQuoteCount = 1; - } - /* Is this one of the test sequences where we prepare some data? */ - if (strncmp("cat ",acLineIn,4) == 0) { - if (iEchoLevel > 0) { - f_outputLine(pfTestoOut, "@echo off"); - f_outputLine(pfTestoOut, "@echo."); - iEchoLevel = 0; - } - iStart = 4; - strcat(acLineOut, "TYPE "); - iTarget = 5; - } - /* Is this one of the test sequences where we prepare some data by using sed? */ - /* we only cater for sed that removes lines - this is only windows after all */ - if (strncmp("sed '/",acLineIn,6) == 0) { - pcTerm = strstr(acLineIn+6,"/d'"); - - /* Did we find a terminator in the string? */ - if ((pcTerm != NULL) && ((pcTerm - acLineIn) < LINELENGTH)) { - if (iEchoLevel > 0) { - f_outputLine(pfTestoOut, "@echo off"); - f_outputLine(pfTestoOut, "@echo."); - iEchoLevel = 0; - } - iStart = 6; - strcat(acLineOut, "FINDSTR /V /R /C:\""); - iTarget = 18; - for (iThisChar=6; iThisChar<(pcTerm - acLineIn); iThisChar++) { - acLineOut[iTarget++] = acLineIn[iStart++]; - } - acLineOut[iTarget++] = (char)0; - strcat(acLineOut, "\""); - iStart += 3; /* skip over the terminator of the sed command */ - } /* Did we find a terminator in the string? */ - } - if ((iStart > 0) || - (iPrevLineContinues == 1)) { - - if (iStart == 0) { - /* Didn't match, so can only possibly be a continued line - Skip spaces, then process the rest of line as "normal" */ - for (iThisChar=0; iThisChar 0) ? 0 : 1; - iTarget--; - continue; - } - if (acLineIn[iThisChar] == '%') { - if (iQuoteCount == 1) { - /* Need to double up the number of %s */ - acLineOut[iTarget+iThisChar-iStart] = '%'; - iTarget++; - } - /* This also caters for where we're not in quotes, - so must just copy the % once */ - acLineOut[iTarget+iThisChar-iStart] = '%'; - continue; - } - if (acLineIn[iThisChar] == '>') { - if (acLineIn[iThisChar-1] == ' ') { - /* Need to remove any spaces between echo and redirection - as NT/2000/XP adds this to the output and mostly this is NOT wanted */ - iTarget--; - } - acLineOut[iTarget+iThisChar-iStart] = '>'; - continue; - } - if (strncmp("${TMPDIR}",acLineIn+iThisChar,9) == 0) { - strcpy(acLineOut+iTarget+iThisChar-iStart,"%TMPDIR%"); - /* %TMPDIR% is one char shorter than ${TMPDIR} */ - iTarget--; - /* skip forward to the end of the string matched - (less one as the loop will add one) */ - iThisChar += 8; - } else if (strncmp("${PNAME} ",acLineIn+iThisChar,9) == 0) { - strcpy(acLineOut+iTarget+iThisChar-iStart,"%PNAME% "); - /* one char shorter */ - iTarget--; - /* skip forward to the end of the string matched - (less one as the loop will add one) */ - iThisChar += 8; - } else if (acLineIn[iThisChar] == '/') { - acLineOut[iTarget+iThisChar-iStart] = '\\'; - } else { - /* part of a literal, so copy the text */ - acLineOut[iTarget+iThisChar-iStart] = acLineIn[iThisChar]; - } - } /* for */ - if ((iEchoLevel == 1) && (iPrevLineContinues != 1)) { - f_outputLine(pfTestoOut, "@echo on"); - f_outputLine(pfTestoOut, "@echo Testing..."); - } - iPrevLineContinues = f_outputLine(pfTestoOut, acLineOut); - /* fputs("\r\n"); */ - } - else { - /* We didn't match the start of the line, so - - if blank, print it - */ - if (iEchoLevel > 0) { - f_outputLine(pfTestoOut, "@echo off"); - f_outputLine(pfTestoOut, "@echo."); - iEchoLevel = 0; - } - if ((acLineIn[0] == '\n') || - (acLineIn[0] == '\0') || - ((acLineIn[0] == '\r') && (acLineIn[1] == '\n') && (acLineIn[2] == '\0'))) { - iPrevLineContinues = f_outputLine(pfTestoOut, ""); - } - - } /* else... didn't match a start of line - so check rest of line */ - - } /* else ... catchall to mathing things on the start of the line */ - - } /* while */ - - /* We're done */ - fclose(pfTestoIn); - fclose(pfTestoOut); - } - } -} diff --git a/gpsbabel/msvc/README.msvc b/gpsbabel/msvc/README.msvc index eb1453473..a2592592a 100644 --- a/gpsbabel/msvc/README.msvc +++ b/gpsbabel/msvc/README.msvc @@ -2,9 +2,7 @@ Building GPSBabel on Windows with QtCreator or Microsoft Visual Studio: Windows build support is provided for developers, not currently intended -for release builds or testing. Also, the Windows native projects are normally enabled for -the command line application only, not the GUI. -These project files may not be actively maintained. Releases are built with mingw. +for release builds or testing. Releases are built with mingw. Note also that the Microsoft Visual C++ compiler (MSVC) is less standard compliant than other compilers and may require code modifications to compile. @@ -12,17 +10,26 @@ compliant than other compilers and may require code modifications to compile. Qt: To build you need Qt http://qt-project.com. While the regular GPSBabel build uses Qt 4.6, it is possible to use the console application with Qt 5.1. +Note that the behavior may be slightly different for localisation, due to Qt changes. + +Other libraries: +Note that the "Microsoft Windows SDK" (previously "Microsoft Platform SDK") +is required in addition to the actual compiler package for DeLorme (delbin). +(Unless you have a special need for this format, it is simpler to patch the + code that do not compile.) QtCreator: The GPSBabel.pro file is enabled also for Windows build in QtCreator. To build you need to install a compiler (MS Visual Studio C++ or MinGW c/c++). Just open the GPSBabel.pro file in QtCreator. -If you prefer to use the MS Visual editor, you can generate a GPSBabel.vcxproj file. -To create the project, you can just open a command window, change directory to where you want to create the project file and type: +Microsoft Visual Studio: +If you prefer to use the MS Visual Studio editor ("Visual Studio Express 2012 for +Windows Desktop" is available for free for non-commercial projects from +Microsoft), you can generate a GPSBabel.vcxproj file. +To create the project file GPSBabel.vcxproj, you can just open a command window, change directory to where you want to create the project file and type: For example: ../../Qt/5.1.0/msvc2012/bin/qmake.exe gpsbabel/GPSBabel.pro -Microsoft Visual Studio: Note that the default project is maintained separately from the regular build and is not used by most regular GPSBabel developers. The project may not be updated with for instance new formats. diff --git a/gpsbabel/msvc/mkwintesto.dsp b/gpsbabel/msvc/mkwintesto.dsp deleted file mode 100644 index 41a6b3e40..000000000 --- a/gpsbabel/msvc/mkwintesto.dsp +++ /dev/null @@ -1,100 +0,0 @@ -# Microsoft Developer Studio Project File - Name="mkwintesto" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=mkwintesto - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "mkwintesto.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "mkwintesto.mak" CFG="mkwintesto - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "mkwintesto - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "mkwintesto - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "mkwintesto - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x1009 /d "NDEBUG" -# ADD RSC /l 0x1009 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "mkwintesto - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x1009 /d "_DEBUG" -# ADD RSC /l 0x1009 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "mkwintesto - Win32 Release" -# Name "mkwintesto - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\mingw\mkwintesto.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/gpsbabel/msvc/mkwintesto.sln b/gpsbabel/msvc/mkwintesto.sln deleted file mode 100644 index 7130ec400..000000000 --- a/gpsbabel/msvc/mkwintesto.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Express 2012 for Windows Desktop -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mkwintesto", "mkwintesto.vcxproj", "{7B3D3B02-91E7-4978-A783-007CBACFAA6D}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {7B3D3B02-91E7-4978-A783-007CBACFAA6D}.Debug|Win32.ActiveCfg = Debug|Win32 - {7B3D3B02-91E7-4978-A783-007CBACFAA6D}.Debug|Win32.Build.0 = Debug|Win32 - {7B3D3B02-91E7-4978-A783-007CBACFAA6D}.Release|Win32.ActiveCfg = Release|Win32 - {7B3D3B02-91E7-4978-A783-007CBACFAA6D}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/gpsbabel/msvc/mkwintesto.vcxproj b/gpsbabel/msvc/mkwintesto.vcxproj deleted file mode 100644 index f460a6979..000000000 --- a/gpsbabel/msvc/mkwintesto.vcxproj +++ /dev/null @@ -1,122 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Template - Win32 - - - - - - {7B3D3B02-91E7-4978-A783-007CBACFAA6D} - - - - Application - v110 - false - MultiByte - - - - - - - - - - <_ProjectFileVersion>11.0.60610.1 - .\$(Configuration)\ - .\$(Configuration)\ - - - true - - - false - - - - MultiThreadedDebug - Default - false - Disabled - true - Level3 - true - EditAndContinue - _CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - .\Debug\ - .\Debug\mkwintesto.pch - .\Debug\ - .\Debug\ - EnableFastChecks - - - .\Debug\mkwintesto.tlb - - - 0x1009 - _DEBUG;%(PreprocessorDefinitions) - - - true - .\Debug\mkwintesto.bsc - - - true - true - Console - .\Debug\mkwintesto.exe - %(AdditionalDependencies) - - - - - MultiThreaded - Default - true - true - MaxSpeed - true - Level3 - _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - .\Release\ - .\Release\mkwintesto.pch - .\Release\ - .\Release\ - - - .\Release\mkwintesto.tlb - - - 0x1009 - NDEBUG;%(PreprocessorDefinitions) - - - true - .\Release\mkwintesto.bsc - - - true - Console - .\Release\mkwintesto.exe - odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - - - - - \ No newline at end of file diff --git a/gpsbabel/waypt.cc b/gpsbabel/waypt.cc index 0f653dc15..e69cffc7a 100644 --- a/gpsbabel/waypt.cc +++ b/gpsbabel/waypt.cc @@ -595,7 +595,7 @@ waypt_speed_ex(const waypoint* A, const waypoint* B) return 0; } - time = fabs(A->creation_time.msecsTo(B->creation_time)) / 1000.0; + time = fabs((double)A->creation_time.msecsTo(B->creation_time)) / 1000.0; if (time > 0) { return (dist / time); } else { @@ -618,7 +618,7 @@ waypt_speed(const waypoint* A, const waypoint* B) return 0; } - time = fabs(A->creation_time.msecsTo(B->creation_time)) / 1000.0; + time = fabs((double)A->creation_time.msecsTo(B->creation_time)) / 1000.0; if (time > 0) { return (dist / time); } else { -- 2.30.2